<?php
require_once('../../config/config.inc');
header('Content-Type: text/html; charset=utf-8');
//Connect to mysql server
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) {
	die('Failed to connect to server: ' . mysql_error());
}

//Select database
$db = mysql_select_db(DB_DATABASE);
if(!$db) {
	die("Unable to select database");
}
mysql_set_charset('utf8',$db);
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET NAMES utf8_persian_ci");

$qry = mysql_query("INSERT INTO `scholars` VALUES(null,'".$_POST['name']."','".$_POST['disc']."')");
if($qry){
	echo "good";
}
else{
	echo mysql_error();
}